
public class Util {
	public static boolean isNullObject(Object object) {
		return (null == object) ? true : false;
	}
	
	public static boolean isNullOrEmptySring(String toChk) {
		return (null == toChk || toChk.equals(" ") || toChk.isEmpty() ? true
				: false);
	}
	
	public static boolean isNumberOnly(String toChk) throws ImageException {
		boolean isNumber = false;
		if (!Util.isNullOrEmptySring(toChk)) {
			char[] temp = toChk.toCharArray();
			for (char c : temp) {
				if (c > '0' && c < '9') {
					isNumber = true;
				} else {
					isNumber = false;
					break;
				}
			}
		} else {
			throw new ImageException("empty string passed for parsing");
		}
		return isNumber;
	}
}
